#!/usr/bin/env python
# -*- coding: UTF-8 -*-

import Lib
import Monitor

class Host(object):

    def __init__(self, hostname):
        
        if not hostname in ("127.0.0.1", "localhost") and hostname != Lib.Infos.getHostname():
            self._hostname = hostname
        else:
            self._hostname = "localhost"
        self._parts = Monitor
        
    def espace_disk(self, parts = "all"):
        if len(self.parts) == 0:
            self._parts = Lib.Infos.getParts()
        if parts != "all" and parts not in self._parts:
            return('erreur la partition n\'existe pas')
        elif parts == "all":
            parts = self._parts
        return(Monitor.getDiskSpace(parts))


#    def 